package net.joke.base;

import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.text.Text;
import org.anddev.andengine.opengl.font.Font;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;

/**
 * Questa classe serve a mantenere tutte le risorse di AndEngine (quantomeno le textures)<br>
 * Funge anche da Factory per generare gli sprite necessari ai Renderable<br>
 * @author Gianluca
 *
 */
public class Res {
	
	public static BitmapTextureAtlas mGreenFontTexture;
	public static BitmapTextureAtlas mRedFontTexture;
	public static Font mGreenFont;
	public static Font mRedFont;
	
	public static Scene scene;
	
	public static Text greenText(Scene scene, float text, float x, float y) {
		int tmp = (int)text;
		return greenText(scene, String.valueOf(tmp), x, y);
	}
	public static Text greenText(Scene scene, String text, float x, float y) {
		return text(scene, text, x, y, mGreenFont);
	}
	public static Text text(Scene scene, String text, float x, float y, Font font) {
		Text rv = new Text(x, y, font, text);
		scene.attachChild(rv);
		return rv;
	}
 	
}
